﻿using Microsoft.AspNetCore.Builder;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Threading.Tasks;

namespace FRMS.BUS.ServerPlatform
{
    public static class ServerPlatformExtensions
    {
        public static IApplicationBuilder UseServerPlatform(this IApplicationBuilder app)
        {
            var server = app.ApplicationServices.GetRequiredService<FRMSServer>();

            return app;
        }

        public static IApplicationBuilder UseSerialPort(this IApplicationBuilder app)
        {
            var server = app.ApplicationServices.GetRequiredService<SerialPortBUS>();

            return app;
        }
    }
}
